@extends('layouts.default') @section('main')
    <link rel="stylesheet" href="/css/uniform.css" />
    <link rel="stylesheet" href="/css/select2.css" />
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb">
                <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a>
                <a href="#" class="current">活动奖品列表</a>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    <a href="{{url('actprize/create')}}"><button class="btn">新增</button></a>
                    <div class="widget-box">
                        <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                            <h5>活动奖品管理</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>名字</th>
                                    <th>图片</th>
                                    <th>奖品内容</th>
                                    <th>类型</th>
                                    <th>所属的活动(点击跳转)</th>
                                    <th>数量</th>
                                    <th>排序</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($lists as $key => $list)
                                    <tr class="gradeX">
                                        <td>{{$list->name}}</td>
                                        <td><img src="{{getImage($list->image)}}" width="100" height="100"/></td>
                                        <td>{{$list->content}}</td>
                                        <td>@if($list->type==1)一等奖@elseif($list->type==2)二等奖@elseif($list->type==3)三等奖@elseif($list->type==4)普通奖@endif</td>
                                        <td>@if(isset($list->act)){{$list->act->title}}@endif</td>
                                        <td>@if(isset($list->setting)){{$list->setting->num}}@endif</td>
                                        <td>{{$list->sort}}</td>
                                        <td class="center">
                                            @if(in_array('edit',$actions))<a data-original-title="编辑" class="tip" href="{{url('actprize/edit?id='.$list->id)}}"><i class="icon-pencil"></i></a> @endif
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <?php echo $lists->render();?>
                </div>
            </div>
        </div>
    </div>
    <script src="/js/matrix.tables.js"></script>
@stop
